@echo off
echo ============================================
echo Starting n8nCRM Backend Server
echo ============================================

cd /d D:\n8ncrm\backend

echo.
echo Cleaning up old processes...
venv\Scripts\python.exe force_cleanup.py

echo.
echo Waiting 2 seconds...
timeout /t 2 /nobreak > nul

echo.
echo Starting server on port 8000...
venv\Scripts\python.exe -m uvicorn app.main:app --host 0.0.0.0 --port 8000

pause
